package cn.zysuyuan.item.service.impl;

import cn.zysuyuan.common.entity.PageResult;
import cn.zysuyuan.item.entity.MedicinalProductBase;
import cn.zysuyuan.item.entity.ProductBase;
import cn.zysuyuan.item.mapper.WxProductBaseMapper;
import cn.zysuyuan.item.service.WxProductBaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author flypig
 * @version 1.0
 * @date 2019-12-17 12:48
 */

@Service
public class WxProductBaseServiceImpl implements WxProductBaseService {

    @Autowired
    private WxProductBaseMapper wxProductBaseMapper;

    @Override
    public PageResult<ProductBase> select(String pbname) {
        List<ProductBase> productBases = this.wxProductBaseMapper.select(pbname);
        return new PageResult<ProductBase>(productBases);
    }

    @Override
    public PageResult<MedicinalProductBase> selectMedicinalPb(String id) {
        List<MedicinalProductBase> productBases = this.wxProductBaseMapper.selectMedicinalPb(id);
        return new PageResult<MedicinalProductBase>(productBases);
    }
}
